<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>金币获取记录管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
 
	<form:form id="searchForm" modelAttribute="goldcoinTradeRecord" action="${ctx}/goldcointraderecord/goldcoinTradeRecord/userGoldGainList?branchId=${branchId}" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<table>
		 <tr>
		   <td>
		       <div style="margin-left:100px;margin-top:9px">手机号码&nbsp;
		       <form:input path="mobile" htmlEscape="false" maxlength="11" class="input-medium"/>
		       </div>
	       </td>		 
		   <td> 
		        <div style="margin-left:100px;margin-top:9px;">用户id&nbsp;
				<form:input path="userid" htmlEscape="false" maxlength="8" class="input-medium"/>
				</div>
	       </td>
	       <td>
	         <div style="margin-left:30px;margin-top:9px;">每页&nbsp;
			 <select id="pageSize" name="pageSize" class="input-medium">
			    <option value="20"    <c:choose><c:when test="${page.pageSize=='20'}">selected=true</c:when></c:choose>>20</option>
				<option value="30"    <c:choose><c:when test="${page.pageSize=='30'}">selected=true</c:when></c:choose>>30</option>
				<option value="100"   <c:choose><c:when test="${page.pageSize=='100'}">selected=true</c:when></c:choose>>100</option>
				<option value="500"   <c:choose><c:when test="${page.pageSize=='500'}">selected=true</c:when></c:choose>>500</option>
				<option value="1000"  <c:choose><c:when test="${page.pageSize=='1000'}">selected=true</c:when></c:choose>>1000</option>
			</td>
			</div>
	     </tr>
			
		  <tr>
		  <td> <div style="margin-left:75px;">金币所属活动&nbsp;</label>
				<select name="activityId" class="input-medium">
					<option value="" label=""/>
					<c:forEach items="${activity}" var="act">
					<option value="${act.activityId}" <c:if test="${act.activityId==actId}">selected</c:if>>${act.activityName}</option>
					</c:forEach>
				</select>
				</div>
			</td>			
			
			<td>
			    <div style="margin-left:58px;margin-top:9px;">用户领取时间&nbsp;
				<input name="beginCreateDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${goldcoinTradeRecord.beginCreateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> - 
				 <input name="endCreateDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${goldcoinTradeRecord.endCreateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
			     </div>
			</td>
						
			<td class="btns">
			  <div style="margin-left:100px;margin-top:9px;"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></div>
			  </td>	  
			<td class="clearfix"></td>
			</tr>
		</table>	
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th	style="color:#5599FF;">序号</th>
				<th	style="color:#5599FF;">用户姓名</th>
				<th	style="color:#5599FF;">用户手机号码</th>
				<th	style="color:#5599FF;">用户Id</th>
				<th	style="color:#5599FF;">金币所属活动</th>
				<th	style="color:#5599FF;">金币个数</th>
				<th	style="color:#5599FF;">有效时间</th>
				<th	style="color:#5599FF;">用户领取时间</th>
				<th	style="color:#5599FF;">金币领取开始时间</th>
				<th	style="color:#5599FF;">金币领取结束时间</th>
		   </tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="goldRecord" varStatus="i">
			<tr>
				<td>
					${i.index+1}
				</td>
				<td>
					${goldRecord.userName}
				</td>
				<td>
					${goldRecord.mobile}
				</td>
				<td>
					${goldRecord.userid}
				</td>
				<td>
					${goldRecord.activityName}
				</td>
				<td>
					${goldRecord.goldnumber}
				</td>
				<td>
					<fmt:formatDate value="${goldRecord.goldValidityStart}" pattern="yyyy/MM/dd"/>
					-<fmt:formatDate value="${goldRecord.goldValidityEnd}" pattern="yyyy/MM/dd"/>
				</td>
				<td>
					<fmt:formatDate value="${goldRecord.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
				    <fmt:formatDate value="${goldRecord.goldCollectionStart}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
				    <fmt:formatDate value="${goldRecord.goldCollectionEnd}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>